/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ia_0.data_model.character;

import ia_0.data_model.Element;
import ia_0.data_model.character.POI;


/**
 *
 * @author jderenty
 */
public class Character  extends Element implements Runnable{
    public CharacterAction actions=new CharacterAction(this);

    public int health;
    public int hungry;
    public int tired;

    public Knowledge knowledge=new Knowledge();
    boolean male;


    public Character(){
    }

    public Character(int health_,int tired_, int hungry_, boolean male){
        this.health=health_;
        this.male=male;
        this.hungry=hungry_;
        this.tired=tired_;
    }

    /*
     * Verifier l'etat de personnage
     *
     */
    public boolean verifie(){
        if(health>0){
            hungry--;
            tired--;
            return true;
        } else{
            return false;
        }
        
    }


    public void run(){
            verifie();
            actions.strategie();
            actions.agit();
    }
    /*
     * Les actions communs
     *
     */


    public void addKnow(POI p){
        knowledge.addPoi(p);
    }
    
}
